//
//  LGZuPuPersonalViewController.m
//  ligenyun
//
//  Created by Mac on 2018/4/9.
//  Copyright © 2018年 stoneobs@icloud.com. All rights reserved.
//

#import "LGZuPuPersonalViewController.h"

@interface LGZuPuPersonalViewController ()
@property(nonatomic, strong) STButton     *iconButton;
@property(nonatomic, strong) STButton     *titleButton;
@property(nonatomic, strong) STLabel     *desLable;
@property(nonatomic, strong) STLabel     *timeLable;
@end

@implementation LGZuPuPersonalViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"个人信息";
    [self configSubView];
    // Do any additional setup after loading the view.
}

#pragma mark --subView
- (void)configSubView{
    UIView * header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, UIScreenWidth, 40)];

    header.backgroundColor = [UIColor whiteColor];
    
    self.iconButton = [[STButton alloc] initWithFrame:CGRectMake(15, 10, 60, 60)
                                                title:nil
                                           titleColor:nil
                                            titleFont:0
                                         cornerRadius:30
                                      backgroundColor:nil
                                      backgroundImage:[UIImage imageNamed:@"1"]
                                                image:nil];
    [header addSubview:self.iconButton];
    
    self.titleButton = [[STButton alloc] initWithFrame:CGRectMake(self.iconButton.right + 10, 15, 100, 20)
                                                title:@"小明"
                                           titleColor:FirstTextColor
                                            titleFont:14
                                         cornerRadius:0
                                      backgroundColor:nil
                                      backgroundImage:nil
                                                image:[UIImage imageNamed:@"男"]];
    [self.titleButton makeImageRight];
    [header addSubview:self.titleButton];
    
    STLabel * desLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+ 10,self.titleButton.bottom, UIScreenWidth - self.iconButton.right, 20)
                                                   text:@"族谱号:0223323"
                                              textColor:SecendTextColor
                                                   font:12
                                            isSizetoFit:NO
                                          textAlignment:NSTextAlignmentLeft];
    self.desLable = desLable;
    [header addSubview:self.desLable];
    
    STLabel * timeLable = [[STLabel alloc] initWithFrame:CGRectMake(self.iconButton.right+10,self.desLable.bottom, UIScreenWidth - self.iconButton.right, 20)
                                                    text:@"个人简介:1918年03月23日"
                                               textColor:SecendTextColor
                                                    font:12
                                             isSizetoFit:NO
                                           textAlignment:NSTextAlignmentLeft];
    self.timeLable = timeLable;
    [header addSubview:self.timeLable];
    
    header.height = self.iconButton.bottom + 10;
    self.tableView.tableHeaderView = header;
}

@end
